#斐波那契数列
def fibonacci():
    fib_list = [0 , 1]
    while True:
        new_fib = fib_list[-1] +fib_list[-2]
        if new_fib > 50:
            break
        fib_list.append(new_fib)
    return fib_list

print(fibonacci())

#计算矩形周长面积
def calculate():
    length = float(input("请输入矩形的长: "))
    width = float(input("请输入矩形的宽: "))
    area = length * width
    perimeter = 2 * (length + width)
    print("矩形的面积是:", area)
    print("矩形的周长是:", perimeter)
calculate()